﻿<%@ Page Title="" Language="C#" MasterPageFile="../MasterPage.master" AutoEventWireup="true" CodeFile="Register.aspx.cs" Inherits="User_Register" %>

<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <h3>Register</h3>
    <table style="margin:auto" class="auto-style4">
        <tr>
            <td class="auto-style13">
                <asp:Label ID="Label1" runat="server" Text="Username"></asp:Label></td>
            <td class="auto-style14">
                <asp:TextBox ID="tbUsername" runat="server" CssClass="form-control" Width="160px"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td class="auto-style13">
                <asp:Label ID="Label2" runat="server" Text="Password"></asp:Label>
            </td>
            <td class="auto-style14">
                <asp:TextBox ID="tbPass" runat="server" CssClass="form-control" TextMode="Password" Width="160px"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td class="auto-style13">
                <asp:Label ID="Label3" runat="server" Text="Comfirm Password"></asp:Label>
            </td>
            <td class="auto-style14">
                <asp:TextBox ID="tbCPass" runat="server" CssClass="form-control" TextMode="Password" Width="161px"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td class="auto-style13">
                <asp:Label ID="Label5" runat="server" Text="Full Name"></asp:Label>
            </td>
            <td class="auto-style14">
                <asp:TextBox ID="tbName" runat="server" CssClass="form-control" Width="160px"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td class="auto-style13">
                Gendre</td>
            <td class="auto-style14">
                <asp:DropDownList ID="DropDownList1" CssClass="selectpicker" runat="server" Height="16px" Width="144px">
                    <asp:ListItem>Male</asp:ListItem>
                    <asp:ListItem>Female</asp:ListItem>
                </asp:DropDownList>
            </td>
        </tr>
        <% if(Session["Logined"] != null) 
           { %>
        <tr>
            <td class="auto-style13">
                Role</td>
            <td class="auto-style14">
                <asp:DropDownList ID="DropDownList2" runat="server" DataSourceID="SqlDataSource2" DataTextField="role_name" DataValueField="id" CssClass="dropdown">
                </asp:DropDownList>
                <asp:SqlDataSource ID="SqlDataSource2" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>" SelectCommand="select * from roles"></asp:SqlDataSource>
            </td>
        </tr>
        <% } %>
        <tr>
            <td class="auto-style15">
                <asp:Label ID="Label6" runat="server" Text="Email"></asp:Label>
            </td>
            <td class="auto-style15">
                <asp:TextBox ID="tbMail" runat="server" CssClass="form-control" Width="160px"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td class="auto-style9">
                &nbsp;</td>
            <td class="auto-style15">
                &nbsp;</td>
        </tr>
        <tr>
            <td class="auto-style9" colspan="2" align="center">
                <asp:Button ID="Button1" runat="server" Text="Register" OnClick="Button1_Click1" CssClass="btn btn-primary" />
                &nbsp;&nbsp;&nbsp;&nbsp;
                <asp:Button ID="Button2" runat="server" Text="Clear" OnClick="Button2_Click" Width="89px" CausesValidation="False" CssClass="btn btn-primary" UseSubmitBehavior="False" />
            </td>
        </tr>
    </table>
    <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>" SelectCommand="select * from courses"></asp:SqlDataSource>
</asp:Content>

<asp:Content ID="Content3" runat="server" contentplaceholderid="head">
    <style type="text/css">
        .auto-style4 {
            width: 50%;
            height: 327px;
        }
        .auto-style9 {
            margin: 5px 0;
            height: 37px;
        }
        .auto-style13 {
            margin: 5px 0;
            height: 36px;
        }
        .auto-style14 {
            height: 36px;
        }
        .auto-style15 {
            height: 37px;
        }
    </style>
</asp:Content>


